-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Debug] Added configuration reference for new debug options #6870
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lyrixx
force-pushed
the
debug-plus-plus
branch
2 times, most recently
from
August 17, 2016 15:23
0a6fe77
to
cc5c089
Compare
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Aug 17, 2016
This PR was merged into the 3.2-dev branch. Discussion ---------- [Debug] Better error handling | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#6870 1. Send the raw exception in the log context instead of custom formatting 2. Add config option to log/throw in Symfony all PHP errors 3. Always use an exception when a PHP error occurs 4. Expand exception in the log context in the web developer toolbar 5. Use the dumper to dump log context in the web developer toolbar --- I used the following code to produce screenshots: ```php public function indexAction(Request $request) { $this->get('logger')->info('A log message with an exception', ['exception' => new \Exception('this exception will be logged')]); error_reporting(0); for ($i=0; $i < 15; $i++) { if ($i == 5) { error_reporting(E_ALL); } if ($i == 10) { error_reporting(0); } trigger_error("Trigger error avec E_USER_NOTICE", E_USER_NOTICE); } error_reporting(E_ALL); @trigger_error("trigger_error avec E_USER_DEPRECATED", E_USER_DEPRECATED); trigger_error("trigger_error avec E_USER_DEPRECATED (not silent)", E_USER_DEPRECATED); // ... ``` ![screenshot16](https://cloud.githubusercontent.com/assets/408368/17582279/2c4239b0-5fab-11e6-8428-2eaa7372cce3.png) ![screenshot17](https://cloud.githubusercontent.com/assets/408368/17582287/30cad1ea-5fab-11e6-9b0b-de0fa9f3913b.png) ![screenshot18](https://cloud.githubusercontent.com/assets/408368/17582291/348bb574-5fab-11e6-83b0-5bfaac080838.png) Commits ------- 8f24549 [Debug] Better error handling
xabbuh
reviewed
Sep 22, 2016
**type**: ``boolean`` **default**: ``%kernel.debug%`` | ||
|
||
Throw PHP errors as ``\ErrorException`` instances. The parameter | ||
``debug.error_handler.throw_at`` control the threshold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. Fixed.
Please also add |
lyrixx
force-pushed
the
debug-plus-plus
branch
from
September 22, 2016 09:10
cc5c089
to
7ea70c8
Compare
👍 Status: Reviewed |
wouterj
added a commit
that referenced
this pull request
Oct 6, 2016
…ions (lyrixx) This PR was merged into the master branch. Discussion ---------- [Debug] Added configuration reference for new debug options Commits ------- 7ea70c8 [Debug] Added configuration reference for new debug options
wouterj
added a commit
that referenced
this pull request
Oct 6, 2016
Thanks @lyrixx, it looks perfect! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.